from Cheetah import Template
import string
from mod_python import apache
from mod_python import Session
class myindex:
    def __init__(self):
        pass
    def GET(self, req):
        s = Session.Session(req)
        try:
            s['hits'] += 1
        except:
            s['hits'] = 1
        s.save()
        req.session = s
        
 	label ={ "label":"learn python, mod_python, cheetah"}
	template = Template.Template(file="/var/www/easyrouter/mytest.html", searchList=[label])
	content = template.respond()
        
	req.content_type = "text/html"
        req.send_http_header()
	req.write(content)
        req.write(req.uri)
        req.write("i love pjx")
        req.write('hits: %d' % s['hits']) 
